Camera having an adaptive gain control

ABSTRACT

A system for generating a digital output signal representing a captured image includes a sensor for capturing the image and generating a sensor output signal. A gain control amplifier is coupled to the sensor and receives the sensor output signal. The gain control amplifier has controls for applying various levels of gain to the sensor output signal. An analog-to-digital converter is coupled to the gain control amplifier and generates the digital output signal representing the captured image. A processor is coupled to the analog-to-digital converter and the gain control amplifier. The processor provides a control signal to the gain control amplifier for adjusting the level of gain applied by the amplifier.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to image processing. Morespecifically, a system for capturing and processing video images.

[0003] 2. Background

[0004] Digital cameras are used in a variety of applications requiringimage capture and image processing. Many applications require cameraswhich are economical, yet generate a high quality video signal. Typicalsolid state sensors used in digital cameras have a dynamic range (orlight intensity range) of 1000:1 or greater. However, many existingdigital cameras utilize an inexpensive 8 bit or 6 bit analog-to-digital(A/D) converter to generate a digital output signal representing thecaptured image. The use of an 8 bit A/D converter limits the dynamicrange of the output signal by providing a maximum of 256 possibleluminance levels. Therefore, the dynamic range capabilities of thesensor (1000:1) are compressed to 256:1 by the A/D converter. Thisreduction in dynamic range results in “dipping” of the image; i.e., lossof image detail in bright areas and dark areas of the image. Whenclipping occurs, dark areas of the image become black (e.g., luminancelevel 0) and bright areas of the image become white (e.g., luminancelevel 255).

[0005] Existing cameras attempt to compensate for this dynamic rangereduction by using an automatic gain control (AGO amplifier havingdifferent gain settings. The gain setting of the AGC amplifier isdetermined based on the total luminance entering the camera. Since asingle luminance level is determined, the selected gain setting isapplied uniformly to the entire image.

[0006] An example of an existing camera is illustrated in FIG. 1. Adigital camera 10 is attached to an image processor 12. Camera 10captures an image of scene 14 and generates a digital signalrepresenting the captured image. A solid state sensor 16 in camera 10captures an image of scene 14. Typical solid state camera sensors arecapable of discriminating light intensity over a dynamic range of 1000:1or greater. Sensor 16 generates a sensor output signal representing thesensed image and provides the signal to an AGC amplifier 18. AGCamplifier 18 applies a particular gain setting to the sensor outputsignal. A/D converter 20 receives an output signal from AGC amplifier18. As discussed above, A/D converter 20 may be an 8 bit or 6 bitconverter. Using an 8 bit A/D converter 20, the dynamic range of thesensor output signal is compressed to 256:1. Similarly, using a 6 bitA/D converter 20, the dynamic range of the sensor output signal iscompressed to 64:1. This dynamic range compression results in a loss ofimage detail at both ends of the dynamic range; i.e., bright areas anddark areas. As a result, bright areas of the image are compressed intoall white regions and dark areas of the image are compressed into allblack regions.

[0007] AGC amplifier 18 typically has several different gain settingswhich may be applied to the sensor output signal. The required gainsetting for a particular image is selected based on the total lightentering camera 10. If the total light level is low, the gain setting isincreased. Similarly, if the total light level is high, the gain settingis decreased. The particular gain setting selected is applied uniformlyto the entire image. A/D converter 20 generates a digital video outputsignal on a signal line 22. As discussed above, the dynamic range of thedigital video output signal is limited by the capacity of A/D converter20.

[0008]FIG. 1 also illustrates image processor 12 coupled to camera 10.Image processor 12 is an optional component, and is not required forproper operation of camera 10. The digital video signal output providedon line 22 may be connected directly to a device capable of acceptingdigital signals. The optional image processor 12 includes a videoprocessing circuit 24 and a digital-to-analog (D/A) converter 26. Videoprocessing circuit 24 receives the digital video signal output from line22 and performs various processing of the signal. Various types of videoprocessing circuits and video processing functions will be known tothose skilled in the art. D/A converter 26 receives a signal from thevideo processing circuit, converts the signal to an analog value, andgenerates an analog video signal output on signal line 28. This analogvideo signal may be transmitted to any device capable of receivinganalog video signals.

[0009] Problems associated with dynamic range reduction may be solved byutilizing a 10 bit or 12 bit A/D converter to preserve the dynamic rangeof the sensor output signal. However, 10 bit and 12 bit A/D convertersare expensive and substantially increase the cost of the camera. In anapplication requiring an inexpensive camera, the use of 10 bit or 12bit. A/D converters is not practical.

[0010] It is therefore desirable to provide a low-cost digital camerautilizing an inexpensive A/D converter, yet capable of generating avideo signal containing image detail in bright areas and dark areas ofthe image.

SUMMARY OF THE INVENTION

[0011] The present invention provides a digital camera having aninexpensive A/D converter and including a processor for enhancing thedynamic range of the camera. The processor instructs a gain controlamplifier to reduce the gain in bright areas of the image and increasethe gain in dark areas of the image. These changes in gain settings fordifferent portions of the image increase the image detail provided bythe camera, thereby improving the overall image quality.

[0012] An embodiment of the present invention provides a sensor forcapturing an image and generating a sensor output signal. A gain controlamplifier is coupled to the sensor and receives the sensor outputsignal. The gain control amplifier has controls for applying variouslevels of gain to the sensor output signal. An analog-to-digitalconverter is coupled to the gain control amplifier and generates adigital output signal representing the captured image. A processor iscoupled to the analog-to-digital converter and the gain controlamplifier. The processor provides a control signal to the gain controlamplifier for adjusting the level of gain applied by the amplifier.

[0013] Another feature of the present invention provides a gain mapcontaining gain settings applied to the sensor output signal by the gaincontrol amplifier. The gain map is continually updated by the processorto include changes in the captured image.

[0014] Other embodiments of the invention provide a register coupled tothe processor and the gain control amplifier. The gain map containinggain settings is stored in the register and the gain control amplifierreads the gain settings from the register.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention is illustrated by way of example in thefollowing drawings in which like references indicate similar elements.The following drawings disclose various embodiments of the presentinvention for purposes of illustration only and are not intended tolimit the scope of the invention.

[0016]FIG. 1 illustrates a known digital camera and an attached imageprocessor.

[0017]FIG. 2 is a first embodiment of a camera and processor accordingto the present invention.

[0018]FIG. 3 is a flow diagram illustrating operation of the presentinvention.

[0019]FIG. 4 is a flow diagram showing the analysis of a captured imageand the updating of a gain map used by the camera.

[0020]FIG. 5 illustrates an exemplary captured image divided into anarray of image regions.

[0021]FIGS. 6A-6C illustrate a gain map at different stages of the imageprocessing procedure.

[0022]FIGS. 7A-7D illustrate examples of histograms generated forvarious regions of an image.

[0023]FIG. 8 is a second embodiment of the invention including aregister within the camera.

[0024]FIG. 9 is a third embodiment of the invention having a processorcontained within the camera.

[0025]FIG. 10 is a fourth embodiment of the invention includingadditional processing circuitry within the camera.

DETAILED DESCRIPTION

[0026] The following detailed description sets forth numerous specificdetails to provide a thorough understanding of the invention. However,those skilled in the art will appreciate that the invention may bepracticed without these specific details. In other instances, well knownmethods, procedures, components, and circuits have not been described indetail so as not to obscure the invention.

[0027] The present invention provides a system for enhancing the dynamicrange of a digital camera having an inexpensive A/D converter. Anadaptive gain control mechanism is provided for adjusting gain settingsapplied to a captured image.

[0028] A first embodiment of the invention is illustrated in FIG. 2. Adigital camera 100 contains a sensor 102 for capturing an imagerepresenting a scene 104. Sensor 102 may be any type of sensor capableof generating a signal representing a captured image. In a particularembodiment of the invention, sensor 102 is a solid state sensor having adynamic range of 1000:1 or greater. Sensor 102 generates a sensor outputsignal representing the captured image. The sensor output signal isprovided to a gain control amplifier 106 having controls for applyingvarious levels of gain to the captured image. In an embodiment of theinvention, gain control amplifier 106 is an automatic gain control (AGOamplifier capable of receiving and adjusting the sensor intensity ateach pixel site. An analog output signal from AGC amplifier 106 isprovided to the input of an analog-to-digital (A/D) converter 108.

[0029] As discussed above, A/D converter 108 may be a relativelyinexpensive 6 bit or 8 bit A/D converter. To simplify the explanation ofthe invention, the specification describes camera 100 and its operationwhen using an 8 bit A/D converter 108.

[0030] A/D converter 108 converts the signal received from gain controlamplifier 106 from an analog signal to a digital signal. The digitaloutput, of A/D converter 108 is provided on signal line 110 andrepresents an 8 bit digital video signal of the captured image. As notedabove, the dynamic range of the signal on line 110 is limited by the 8bit capacity of A/D converter 108.

[0031] The digital video signal on signal line 110 is also transmittedto a processor 114 using signal line 112. Processor 114 may be any typeof processor capable of receiving a digital video signal and performingvarious operations or calculations related to the received signal.Processor 114 can be a dedicated image processing system or part of asystem servicing other devices or performing other functions. In apreferred embodiment of the invention, processor 114 is a personalcomputer capable of performing a variety of operations and servicingnumerous devices. In the preferred embodiment, the personal computerutilizes a Pentium@ processor manufactured by Intel Corporation of SantaClara, Calif.

[0032] The actual operations and processing steps performed by processor114 may be implemented in software executed by processor 114. Thoseskilled in the art will appreciate that processor 114 may be a singleprocessor device capable of processing digital data (e.g., a digitalsignal processor) or processor 114 may be a complete computer systemcontaining a variety of devices and capable of performing multiplesimultaneous operations. Thus, the invention is capable of beingimplemented on a wide variety of processing devices and computerplatforms.

[0033] By way of example, the invention will be described in animplementation utilizing a personal computer as processor 114. Numeroustype of computers may be used to practice the invention. The computermust be capable of receiving the digital video signal on signal line112, performing the necessary operations and calculations, andtransmitting a control signal to gain control amplifier 106 using acommunication line 116. Line 116 functions as a control bus used tocommunicate control signals and data between processor 114 and gaincontrol amplifier 106. In a specific embodiment of the invention, line116 is a high-speed serial bus such as a Universal Serial Bus (USB).Although the invention will be described with reference to a high-speedserial bus, any communication line having sufficient bandwidth and lowlatency may be used to implement the invention.

[0034] In the embodiment of FIG. 2, processor 114 provides real timecontrol of the gain settings applied by gain control amplifier 106. Inthis situation, the timely transmission of control signals is importantto proper camera operation. A significant amount of bandwidth and lowlatency is required to ensure that gain control amplifier 106 receivesthe appropriate control signals when needed. Alternate embodiments ofthe invention may require a smaller portion of the bandwidth and maytolerate greater latency. These alternate bandwidth and latencyrequirements will be discussed with respect to the particularembodiments described below.

[0035]FIG. 3 is a flow diagram illustrating the operation of the systemshown in FIG. 2. At step 118 an image is captured by sensor 102 incamera 100. At step 120, sensor 102 generates a sensor output signalwhich is provided to gain control amplifier 106. At step 122, gaincontrol amplifier 106 determines appropriate gain settings for variousregions of the captured image and applies the gain to the correspondingregion of the image. The gain settings are provided to gain controlamplifier 106 by processor 114 using line 116. Additional detailsregarding the determination of particular gain settings and dividing thecaptured image into regions are provided below with reference to FIG. 4.

[0036] At step 124 of FIG. 3, gain control amplifier 106 generates again control output signal and provides the signal to A/D converter 108.At step 126, A/D converter 108 converts the gain control output signalfrom an analog signal to a digital video output signal. Finally, at step128, processor 114 analyzes the digital video output signal and updatesthe gain settings, as needed, for various regions of the captured image.The steps of FIG. 3 are performed repeatedly to capture and analyze aseries of images.

[0037] Referring to FIG. 4, a flow diagram illustrates the analysis of acaptured image and the updating of a gain map used by camera 100. Oneexample of a gain map 148 is illustrated in FIG. 6A as a two dimensionalarray of gain settings. The gain settings may be represented in decibels(dB) or any other format capable of indicating the gain to be applied bygain control amplifier 106. Each gain setting indicates a specific gainlevel to be applied by gain control amplifier 106 to a particular regionof the captured image. Gain map 148 includes eight rows and eightcolumns to create 64 gain map cells 150. FIG. 6A illustrates a defaultgain map including a zero value stored in each cell 150 of the gain map.These default gain settings are generated when the system is initializedor reset. During operation of camera 100 and associated processor 114,the gain settings in the gain map are updated to enhance the dynamicrange of the digital video output signal, thereby increasing the levelof detail provided in the digital video signal. In the embodiment ofFIG. 2, gain map 148 is stored in a register or other memory devicewithin processor 114.

[0038] Referring again to FIG. 4, the procedures illustrated in the flowdiagram are performed by processor 114 (shown in FIG. 2). Step 132initializes a row counter and a column counter used to indicate aparticular image region and a particular cell of gain map 148 beinganalyzed or updated. At step 134, the captured image is divided into anarray of image regions. FIG. 5 illustrates an example of a capturedimage 152 divided into a two dimensional array of image regions 154. Forpurposes of explanation, FIG. 5 illustrates the actual scene and doesnot show areas of clipping caused by the AN converter.

[0039] Image 152 is divided into eight rows and eight columns, creating64 image regions 154. Each image region 154 is associated with aparticular gain setting contained in a corresponding cell of gain map148 (FIG. 6A). Image region (2, 4) is a notation indicating the imageregion at the intersection of row 2 and column 4. The gain level appliedto image region (2, 4) is stored in the gain map at cell (2, 4). Thus,each gain map cell provides a gain level to be applied to thecorresponding image region. Although FIGS. 5 and 6A illustrate twodimensional arrays having eight rows and eight columns, any number ofrows and columns may be used. As the number of rows and columns isincreased, the size of each image region decreases, resulting in moreprecise gain adjustments to the captured image. However, additionalprocessing resources are required to analyze the captured image as thenumber of rows and columns are increased.

[0040] At step 136 of FIG. 4, the image region indicated by the row andcolumn counters is analyzed by processor 114. Initially, the row andcolumn counters are set to identify image region (1, 1). The countersare incremented for each subsequent cycle of the procedure until allimage regions have been analyzed. Processor 114 determines the lightlevel in various portions of the image region being analyzed. At step138, the routine determines whether the image region containssignificant bright portions; i.e., whether image detail has been lost or“dipped” due to the 8 bit limitations of the A/D converter. If the imagedetail has been dipped at step 138, then the gain map setting for theimage region being analyzed is updated at step 140. Gain settings areupdated gradually (e.g., 1 dB-5 dB) until sufficient image detail isprovided in each region of the captured image. Gain settings arecontinually updated to compensate for changes in the captured image,such as changes in light levels and changes in objects appearing in thecaptured image.

[0041] If image detail has been clipped from the image region at step138 due to brightness, then the gain map setting for that region isreduced at step 140 to provide increased image detail; i.e., instead ofproducing all white regions, the gain setting is reduced to preventclipping and provide enhanced image detail.

[0042] If significant bright portions are not identified at step 138,then step 142 determines whether the image region being analyzedcontains significant dark portions; i.e., whether image detail has beenlost or clipped by the 8 bit A/D converter. If image detail has beenlost at step 142, then the gain map setting for that region is increasedat step 140 to provide increased image detail. By increasing the gainsetting, previously all black portions of the region may begin to showsome image detail, thereby increasing the overall image quality.

[0043] If the image region being analyzed does not contain significantbright portions or significant dark portions, then the routine continuesto step 144 without updating the gain map setting for the particularimage region. Step 144 determines whether the current row and columncounters indicate the last row and column of the captured image. If allimage regions have been analyzed, then the routine ends. Otherwise, theroutine branches to step 146 where the row and/or column counters areincremented to select the next image region of the captured image. Theroutine then returns to step 136 to analyze the next image region. Theimage regions may be analyzed in any order, Row and column countersrepresent an example of a mechanism for analyzing each image region in asystematic manner.

[0044] When all regions of a captured image have been analyzed accordingto the procedure illustrated in FIG. 4, the updated gain map settingsare applied to the next captured image by gain control amplifier 106(FIG. 2). The digital video signal generated using the new gain settingsis then analyzed by processor 114 using the procedure shown in FIG. 4 tofurther update the gain map settings. Thus, the gain map settings arecontinually updated to maximize the image detail produced in the digitalvideo signal generated by camera 100.

[0045] A particular example of the operations performed in FIG. 4 willbe described with respect to the captured image shown in FIG. 5 and thegain maps illustrated in FIGS. 6A-6C. FIG. 6A illustrates a default gainmap indicating the gain level applied to each region of the firstcaptured image. When camera 100 captures the first image, processor 114has no previous image data from which to generate gain settings.Therefore, processor 114 supplies a default gain map to camera 100 forthe first captured image.

[0046] After capturing the first image, processor 114 divides the imageinto an array of image regions 154, as shown in FIG. 5. Each region 154is analyzed by processor 114 to determine whether the gain setting forthe region should be adjusted to provide increased image detail. UsingFIG. 5 as the first captured image, certain regions of the image arebright (in the area of the window and the sun), certain regions are dark(in the corner of the room to the left of the window), and other regionshave an average light level (near the desk below the window). Processor114 decreases the gain setting associated with bright regions andincreases the gain setting associated with dark regions.

[0047]FIG. 6B illustrates an updated version of gain map 148 afterprocessor 114 has analyzed the first captured image and adjusted thegain settings accordingly. The gain settings illustrated in FIG. 6B arethen provided to gain control amplifier 106 for adjusting the gain ofthe next captured image. As shown in FIG. 6B, the gain settings havebeen increased along the left side of the image (especially in the upperleft portion) in an attempt to reduce clipping in that area and enhanceimage details. Gain settings in the bright area of the window in theupper right portion of the image have been reduced to enhance imagedetails. Gain settings around the desk (below the window) are unchangedbecause a sufficient level of detail is already present. As discussedabove, gain settings are adjusted in small increments (e.g., 1 dB-5 dB)until sufficient image detail is provided in the particular region. Thisprovides a gradual change in the image detail, rather than sharp orsignificant changes between captured images.

[0048] The gain settings illustrated in FIG. 6B are applied by camera100 to the second captured image. For this example, the second capturedimage is the same as FIG. 5; i.e., the scene being captured has notchanged since the first image was captured. Since gain settingadjustments are performed gradually, the second captured image requiresadditional gain setting adjustments to further enhance image details.The digital video output generated by applying the gain settings of FIG.6B to the second captured image is provided to processor 114 foranalysis. As described with respect to the first analysis the secondcaptured image is divided into an array of image regions 154. Each imageregion 154 is analyzed and the associated gain setting updated toenhance the image details in the region. The results of the secondanalysis are illustrated in FIG. 6C. Certain gain settings in the upperleft portion of the gain map have been increased to provide additionalimage details in the dark areas. Gain settings in the bright window areahave been further reduced to enhance image details. The updated gainsettings illustrated in FIG. 6C will be used by camera 100 to adjust thegain of the next captured image.

[0049] The process of capturing an image, applying settings contained ina gain map to the image, and analyzing the digital video output signalto update gain settings is performed repeatedly by the systemillustrated in FIG. 2. The gain settings contained in the gain map areupdated in response to changes in the captured image; e.g., changes inlight level, movement of objects in the image, and the like. Thus, theprocessor is repeatedly updating the gain map settings to enhance theoverall image detail provided in the digital video output signal.

[0050] Those skilled in the art will appreciate that various methods maybe used by processor 114 to analyze light intensity in each imageregion. An embodiment of the invention applies a histogram equalizationalgorithm to each image region. The histogram equalization algorithmgenerates a histogram of pixel luminance values in a particular region.The histogram is used to identify areas of high luminance and lowluminance; i.e., areas requiring gain adjustments. Several exemplaryhistograms are illustrated in FIGS. 7A-7D. FIGS. 7A-7D are provided forillustration purposes and are not drawn to scale or drawn using the samescale.

[0051]FIG. 7A is a histogram for an image region having a high luminancevalue. The histogram illustrates a large number of pixels having amaximum luminance value of 255 (for an 8 bit A/D converter). Thishistogram may correspond to an image region of FIG. 5 in the area of thewindow. In this situation, histogram equalization is performed togenerate an increased number of pixels having values less than 255,thereby enhancing image details in the region.

[0052]FIG. 7B is a histogram for an image region having a low luminancevalue, indicated by the large number of pixels having a luminance valueof zero (the minimum luminance value). This histogram may correspond toan image region on the left side of FIG. 5. In this situation, histogramequalization is performed to generate an increased number of pixelshaving values greater than zero to enhance image details in the region.

[0053]FIG. 7C is a histogram for an image region having both lowluminance values and high luminance values, but few intermediate values.The histogram in FIG. 7C identifies a transition region; i.e., atransition between a bright area and a dark area. These regions mayreceive little or no gain adjustment because both extremes of brightnessand darkness are represented in the same image region. If the gain isincreased, additional pixels may be increased to a value of 255resulting in additional loss of detail in the bright areas. Similarly,if the gain is reduced, additional pixels may be decreased to a value ofzero resulting in additional loss of detail in the dark areas.' FIG. 7Dis a histogram for an image region having a relatively uniformdistribution of pixel luminance values throughout the region. Thishistogram may correspond to an image region under the window in FIG. 5.In this situation, the histogram is already substantially equalized, andno gain adjustments are necessary.

[0054] In addition to the histogram equalization algorithm discussedabove, various methods and algorithms for smoothing sharp edges andtransitions between adjacent image regions will be known to thoseskilled in the art. These methods and algorithms may be utilized withthe present invention to provide smoothing in transition areas andbetween adjacent image regions.

[0055] As noted above, FIG. 2 illustrates a first embodiment of theinvention including camera 100 and processor 114 coupled to the camera.FIGS. 8-10 illustrate alternate embodiments of the invention. Theoperation of these alternate embodiments is similar to the operationdescribed above with reference to FIGS. 3 and 4.

[0056] Referring to FIG. 8, a second embodiment of the invention isillustrated. A camera 156 includes sensor 102, gain control amplifier106, and A/D converter 108 as described above with respect to FIG. 2.Camera 156 generates a digital video signal on line 110 which is coupledto processor 114 using signal line 112. Processor 114 receives thedigital video signal, divides the signal into a plurality of imageregions, and analyzes each region as described above with respect toFIGS. 4, 5, and 6A-6C. Camera 156 also includes a register 160 coupledto processor 114 using a communication line 158. Register 160 is alsocoupled to gain control amplifier 106 using signal line 162. Register160 is capable of receiving and storing a gain map from processor 114and providing the gain map settings to gain control amplifier 106 asnecessary. Register 160 may be a relatively small register, capable ofstoring a single copy of the gain map. Gain setting updates and controlsignals generated by processor 114 are communicated to register 160using line 158. Register 160 stores the updated gain settings for use bygain control amplifier 106.

[0057] The addition of register 160 to camera 156 increases the cost ofthe camera slightly, but eliminates the dependence of gain controlamplifier 106 on communication line 116 (FIG. 2) to receive gainsettings contained in the gain map. If communication line 158 in FIG. 8is shared by other devices and becomes congested, gain setting updatesmay not be communicated to register 160 in a timely manner. In thissituation, gain control amplifier 106 uses the current gain settingscontained in register 160 to adjust the gain of a recently capturedimage. Therefore, this embodiment of the invention may be used with acommunication line 158 having a smaller available bandwidth and greaterlatency because the processor is not providing gain settings to the gaincontrol amplifier in real time. Instead, the gain settings are stored inregister 160 and are always available to the gain control amplifier,even if communication line 158 is congested.

[0058] Referring to FIG. 9, a third embodiment of the invention isillustrated. A camera 164 includes sensor 102, gain control amplifier106, and A/D converter 108 as described above with respect to FIG. 2. Adigital video signal is provided on a signal line 166 to a processor 168located within camera 164. Processor 168 is coupled to gain controlamplifier 106 using line 170. The operation' of the camera shown in FIG.9 is similar to the operation of the system in FIG. 2. Camera 164 isdifferent from camera 100 (FIG. 2) in that processor 168 is containedwithin the camera rather than positioned external to the camera. In thissituation, processor 168 is used exclusively by the camera. Therefore,processor 168 only requires processing capacity to support theoperations of the camera. Although the addition of processor 168 withincamera 164 increases the overall cost of the camera, connectionsassociated with an external processor (as shown in FIG. 2) areeliminated.

[0059] Referring to FIG. 10, a fourth embodiment of the invention isshown. A camera 172 includes sensor 102, gain control amplifier 106, andA/D converter 108 as described above with respect to FIG. 2.Additionally, camera 172 includes a video processing circuit 180 coupledto A/D converter 108 via signal line 174. A digital-to-analog (D/A)converter 182 is coupled to circuit 180 and generates an analog videooutput signal on output line 184. Processor 114 is coupled to A/Dconverter 108 using line 176 and coupled to gain control amplifier 106using communication line 178. The operation of the camera shown in FIG.10 is similar to the operation of the system in FIG. 2. Camera 172differs from camera 100 (FIG. 2) by including circuit 180 and D/Aconverter 182 within the camera such that the camera produces an analogvideo output signal. Video processing circuit 180 may be capable ofperforming a variety of different video processing functions, as will beknown to those skilled in the art.

[0060] From the above description and drawings, it will be understood bythose skilled in the art that the particular embodiments shown anddescribed are for purposes of illustration only and are not intended tolimit the scope of the invention. Those skilled in the art willrecognize that the invention may be embodied in other specific formswithout departing from its spirit or essential characteristics.References to details of particular embodiments are not intended tolimit the scope of the claims.

1. A camera comprising: a sensor configured to capture an image andgenerate a sensor output signal representing the captured image; anamplifier coupled to receive the sensor output signal, wherein theamplifier is configured to apply multiple gain levels to the sensoroutput signal; and a processor coupled to the amplifier, wherein theprocessor is configured to provide a control signal to the amplifier toadjust the gain levels applied by the amplifier.
 2. The camera of claim1 wherein the amplifier applies different gain levels to differentregions of the captured image.
 3. The camera of claim 1 wherein theprocessor generates a gain map containing gain settings applied to thesensor output signal by the amplifier.
 4. The camera of claim 3 whereinthe gain map is continually updated by the processor to include changesin the captured image.
 5. The camera of claim 3 wherein the gain map isa two dimensional array of gain settings, each gain setting indicating aparticular gain applied by the amplifier to a corresponding region ofthe captured image.
 6. The camera of claim 3 further including aregister coupled to the processor and the amplifier.
 7. The camera ofclaim 6 wherein the gain map is stored in the register and the amplifierreads the gain settings from the register.
 8. The camera of claim 1wherein the processor provides the control signal to the amplifier inreal-time.
 9. The camera of claim 1 wherein the processor analyzes thesensor output signal to determine whether a sufficient level of detailis provided in the sensor output signal.
 10. The camera of claim 9wherein the processor increases the gain levels in dark portions of thecaptured image and the processor decreases the gain levels in brightportions of the captured image.
 11. An apparatus for capturing an image,comprising a camera, including: a sensor configured to capture the imageand generate a sensor output signal representing the captured image; anamplifier coupled to receive the sensor output signal, wherein theamplifier has controls to apply multiple gain levels to the sensoroutput signal; and a processor coupled to the camera, wherein theprocessor is configured to receive the sensor output signal, and whereinthe processor is configured to provide a control signal to the amplifierto adjust the gain level applied by the amplifier.
 12. The apparatus ofclaim 11 wherein the processor generates a gain map containing gainsettings applied to the sensor output signal by the amplifier.
 13. Theapparatus of claim 12 wherein the gain map is a two dimensional array ofgain settings, each gain setting indicating a particular gain applied bythe amplifier to a region of the captured image.
 14. The apparatus ofclaim 13 wherein the processor divides the captured image into a twodimensional array of image regions, each image region associated with acorresponding gain setting in the gain map.
 15. The apparatus of claim12 wherein the camera further includes a register coupled to theprocessor and the amplifier.
 16. The apparatus of claim 15 wherein thegain map is stored in the register and the amplifier reads the gainsettings from the register.
 17. A method for enhancing the dynamic rangeof a sensor output signal representing a captured image, the methodcomprising the steps of: amplifying the sensor output signal in responseto gain settings contained in a gain map, wherein each gain setting isassociated with a particular region of the captured image; and updatingthe gain settings contained in the gain map in response to changes inthe sensor output signal.
 18. The method of claim 17 wherein the step ofupdating the gain settings is performed in response to clipping of theamplified sensor output signal.
 19. The method of claim 17 wherein thestep of updating the gain settings includes increasing the gain settingsin dark portions of the image and reducing the gain settings in brightportions of the image.
 20. The method of claim 17 wherein the step ofupdating the gain settings includes dividing the captured image into aplurality of image regions, wherein each image region is associated witha particular gain setting in the gain map.
 21. The method of claim 17further including the step of analyzing each image region and updatingthe associated gain setting in response to clipping of the amplifiedsensor output signal in the image region.
 22. An apparatus for capturingan image and generating a signal representing the captured image,comprising: means for amplifying the signal in response to gain settingscontained in a gain map, wherein each gain setting is associated with aparticular region of the captured image; means for updating the gainsettings contained in the gain map; and means for generating a controlsignal indicating a particular gain setting to be applied to a portionof the signal representing the captured image.